<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Sign extends MY_Controller {

	public static  $m_Type = array(
			DOUBAN_TYPE,
			);
	
	public function __construct()
	{
		parent::__construct();
	
		$this->load->library('my_api',self::$m_Type);

	
	}
	
	public function index()
	{
		$this->m_arrSub = array(
				'common/header'  =>  'index',
				'common/footer'  => 'index',
				);
		
		
		$this->getSub();
		
		// 获取豆瓣的个人信息..
		
		$data = array(
			'id' => $this->my_api->douban_uid,
		);
		
		$doubanUserInfo  = $this->my_api->douban->api('User.info.GET',$data)->makeRequest();
		
		print_r($doubanUserInfo);
		
		$data = array(
			'name' => $doubanUserInfo['uid'],
		);
		
		$doubanUserBook  = $this->my_api->douban->api('Book.collections.GET',$data)->makeRequest();
		
		print_r($doubanUserBook);
		exit;
		$this->load->view('home',$this->data);
		
	}
}

